import http from '../http'

export default {
	// 登录
	login(data) {
		return http.post('/user/login', data)
	},

	// 注册
	register(data) {
		return http.post('/user/register', data)
	},
	//重置密码
	resetPwd(data) {
		return http.post('/user/reset_password', data)
	},
	//个人信息 - 保存
	saveProfile(data) {
		return http.post('/user/save_profile', data,1)
	},
	//银行卡信息 - 保存
	saveBankcard(data) {
		return http.post('/user/save_bankcard', data, 1)
	},
	//上传头像
	uploadAvatar(data) {
		return http.upload('/user/avatar_upload', data)
	},
	// 我的数据
	userInfo(data) {
		return http.get('/user/index', data, 1)
	},
	//会员权益
	privileges(data) {
		return http.get('/user/privileges', data)
	},
	//我的邀请
	qrcode(data) {
		return http.get('/user/qrcode', data,1)
	},
	//我的团队
	teamList(data) {
		return http.get('/user/team', data, 1)
	},
	//收货地址
	address(data) {
		return http.get('/user/address', data, 1)
	},
	//编辑地址 - 详情
	addressDetail(data) {
		return http.get('/user/address_detail', data, 1)
	},
	//添加地址
	addAddress(data) {
		return http.post('/user/address_add', data, 1)
	},
	//编辑地址
	editaddress(data) {
		return http.post('/user/address_edit', data, 1)
	},
	//删除地址
	delAddress(data) {
		return http.post('/user/address_del', data, 1)
	},
	//现金账户
	cashMoney(data) {
		return http.get('/user/cash_money_log', data, 1,1)
	},
	//重置密码
	withdraw(data) {
		return http.post('/user/withdraw', data,1)
	},
	//现金账户 - 提现记录
	withdrawLog(data) {
		return http.post('/user/withdraw_log', data,1,1)
	},
	//现金账户 - 转赠
	cashTransfer(data) {
		return http.post('/user/cash_transfer', data,1,1)
	},
	//复消账户
	repeatMoney(data) {
		return http.get('/user/repeat_money_log', data, 1,1)
	},
	//生息账户
	interestMoney(data) {
		return http.get('/user/interest_money_log', data, 1,1)
	},
	//积分账户
	scoreLog(data) {
		return http.get('/user/score_log', data, 1,1)
	},
	//积分账户 - 转赠
	scoreTransfer(data) {
		return http.post('/user/score_transfer', data,1,1)
	},
	//公告详情
	noticeInfo(data) {
		return http.get('/article/detail', data, 0,1)
	}
}